package org.jeecg.modules.inspection.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Description: 巡检运行异常
 * @Author: jeecg-boot
 * @Date:   2019-09-26
 * @Version: V1.0
 */
@Data
@TableName("process_inspection_exception")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="process_inspection_exception对象", description="巡检运行异常")
public class PinspectionException {
    
	/**id*/
	@TableId(type = IdType.UUID)
    @ApiModelProperty(value = "id")
	private String id;
	/**tenantId*/
	@Excel(name = "tenantId", width = 15)
    @ApiModelProperty(value = "tenantId")
	private String tenantId;
	/**线路ID*/
	@Excel(name = "线路ID", width = 15)
    @ApiModelProperty(value = "线路ID")
	private String processId;
	/**异常说明*/
	@Excel(name = "异常说明", width = 15)
    @ApiModelProperty(value = "异常说明")
	private String processItemId;
	/**异常说明*/
	@Excel(name = "异常说明", width = 15)
    @ApiModelProperty(value = "异常说明")
	private String exceExplain;
	/**异常图片*/
	@Excel(name = "异常图片", width = 15)
    @ApiModelProperty(value = "异常图片")
	private String picture;
	/**异常处理后的图片*/
	@Excel(name = "异常处理后的图片", width = 15)
    @ApiModelProperty(value = "异常处理后的图片")
	private String handlePicture;
	/**异常处理人id*/
	@Excel(name = "异常处理人id", width = 15)
    @ApiModelProperty(value = "异常处理人id")
	@Dict(dicCode = "id",dicText ="realname" ,dictTable = "sys_user")
	private String userId;

	/**问题归属*/
	@Excel(name = "问题归属", width = 15)
    @ApiModelProperty(value = "问题归属")
	@Dict(dicCode = "inspection_type")
	private Integer problemsType;
	/**异常处理结果: 0:未处理  1:已处理*/
	@Excel(name = "异常处理结果: 0:未处理  1:已处理", width = 15)
    @ApiModelProperty(value = "异常处理结果: 0:未处理  1:已处理")
	private Integer handleRes;

	/**0:未解决 1：已解决*/
	@Excel(name = "0:未解决 1：已解决", width = 15)
    @ApiModelProperty(value = "0:未解决 1：已解决")
	@Dict(dicCode = "inspection_execComfirmStatus")
	private Integer comfirmRes;
	/**createBy*/
	@Excel(name = "createBy", width = 15)
    @ApiModelProperty(value = "createBy")
	private String createBy;
	/**createTime*/
	@Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
	private Date createTime;
	/**updateBy*/
	@Excel(name = "updateBy", width = 15)
    @ApiModelProperty(value = "updateBy")
	private String updateBy;
	private String officeId;
	private String allotUser;
	private String dealContents;
	private String processAreaId;
	/**updateTime*/
	@Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
	private Date updateTime;
    @TableField(exist = false)
	private List<ExceptionProcess> exceptionProcessList;
	/**delFlag*/
	@Excel(name = "delFlag", width = 15)
    @ApiModelProperty(value = "delFlag")
	private Integer delFlag;
	@TableField(exist = false)
	private String handleName;
	//确认方向
	@TableField(exist = false)
	public Integer direc;
	@TableField(exist = false)
	private String btn;
    @TableField(exist = false)
	private String projectName;
	@TableField(exist = false)
	public JSONArray pictures;
}
